package com.ideal.service;

import java.util.List;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;

import com.ideal.mapper.IDeptDAO;
import com.ideal.po.Dept;

@Service("deptservice")
public class DeptService {
	
	@Resource
	private IDeptDAO deptdao;
	
	public List<Dept> findall(){
		return deptdao.findall();
	}
	
	public void save(Dept dept) {
		deptdao.adddept(dept);
	}
	
	public Dept findById(int deptno) {
		Dept d=deptdao.findById(deptno);
		return d;
	}
	
	public void delete(Dept dept) {
		deptdao.delete(dept);
	}
	
	public void merge(Dept dept) {
		deptdao.merge(dept);
		
	}
}
